<?php 

 include('../../Connections/KRAPPERCON.php');  
 
 $idServ=clearChar(getParam('idServ',''));
 $idServ_ind='';
 $json='';
 if(trim($idServ)!=''){
	 $sql="call usp_obtDatServicio('".$idServ."')";
	 $res = $mysqli->query($sql);
	 if($res){	
		  while($row = $res->fetch_assoc()){
			$idServ_ind=$row['ServID'];	
			$json.="{id:'".$idServ_ind."',";
			$json.="nom:'".$row['desDetSer']."',";
			$json.="pre:'".$row['impSerMan']."',";
			$json.="mon:'".$row['MoneyID']."'";
			$json.='}';	  
		  }
		  
		  $res->close();
    	  $mysqli->check_result();
	 }
	 
	 if(trim($idServ_ind)=='' ){
	   	    $json.="{id : '0',";
			$json.="nom:'No Existe',";
			$json.="pre:'0',";
			$json.="mon:''";
			$json.='}';
	 } 
	 

 }else{
	  $json.='{';
			$json.="nom:'No Existe',";
			$json.="pre:'0'";
			$json.='}';
 }
 	 echo $json;
?>